<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>晒家</title>
    <link rel="shortcut icon" href="__STATIC__/logo.ico" />
    <!-- <link href="__STATIC__/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> -->
    <link rel="stylesheet" href="__STATIC__/assets/arr_css/bootstrap.min.css">
    <link rel="stylesheet" href="__STATIC__/assets/index_css/head.css">
    <link rel="stylesheet" href="__STATIC__/assets/index_css/footer.css">
    <link href="__STATIC__/layer/layui.css" rel="stylesheet" type="text/css" />
    <!-- <link rel="stylesheet" href="__STATIC__/assets/index_css/index.css"> -->
    <link rel="stylesheet" href="__STATIC__/assets/house/exhibition.css">
    <link rel="stylesheet" href="__STATIC__/assets/house/common.css">
    <link rel="stylesheet" href="__STATIC__/assets/house/scxc.css">
</head>

<body style="background: #FAFAFA;">
    {include file="public/top"}
    <div style="position: relative;">
        <div>
            <img style="width: 100%;" src="__STATIC__/assets/images/shaijia_banrd.png" alt="" style="width: 100%;">
        </div>
        <div style="width: 100%;">
            <img onclick="shaijia()" class="shaijia" src="__STATIC__/assets/images/banner_btn_sharehouse.png" alt="">
        </div>
    </div>

    <div class="exhibition_content">

        <!-- <div style="height: 160px;">
            <img onclick="shaijia()" class="shaijia pull-right" src="__STATIC__/assets/images/banner_btn_sharehouse.png.png" alt="">
        </div> -->



        <table class="exhibition_thing">
            <tbody class="exhibition_thing_img">
                {volist name="homeList" id="v"}
                    <tr class="exhibition_box">
                        <td>
                            <div class="exhibition_box_top">
                                <a href="{:url('Home/sjshaijia1')}">
                                    <img src="{$v.home_img}" alt="" style="width:100%;height:370px;">
                                </a>
                            </div>
                            <div class="exhibition_box_bottom">
                                <div style="padding:0;">
                                    <img src="{$v.user_img}" alt="" style="border:1px solid #fff;border-radius:100px;">
                                </div>
                                <div style="display: flex;flex-direction: column;">
                                    <a href="{:url('Home/sjshaijia1')}">
                                        <b>{$v.user_name}</b>
                                    </a>
                                    <span>{$v.content}</span>
                                </div>
                            </div>
                        </td>
                    </tr>
                {/volist}
                
                <!-- <tr class="exhibition_box">
                    <td>
                        <div class="exhibition_box_top">
                            <a href="{:url('Home/sjshaijia2')}">
                                <img src="__STATIC__/assets/images/shaijia_02.png" alt="">
                            </a>

                        </div>
                        <div class="exhibition_box_bottom">
                            <div style="padding:0;">
                                <img src="__STATIC__/assets/images/shaijiatu_logo2.jpg" alt="">
                            </div>
                            <div style="display: flex;flex-direction: column;">
                                <a href="{:url('Home/sjshaijia2')}">
                                    <b>简单大方半开放式厨房</b>
                                </a>
                                <span>家里人对这款橱柜非常喜欢，我也是在莫愁商城上看中了面板的颜色和橱柜整体设计样式，在这样的厨房里才能为家人坐吃一顿丰盛的晚餐。</span>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr class="exhibition_box">
                    <td>
                        <div class="exhibition_box_top">
                            <a href="{:url('Home/sjshaijia3')}">
                                <img src="__STATIC__/assets/images/shaijia_03.png" alt="">
                            </a>

                        </div>
                        <div class="exhibition_box_bottom">
                            <div style="padding:0;">
                                <img src="__STATIC__/assets/images/shaijiatu_logo2.jpg" alt="">
                            </div>
                            <div style="display: flex;flex-direction: column;">
                                <a href="{:url('Home/sjshaijia3')}">

                                    <b>淡黄主调与原木搭配</b>
                                </a>
                                <span>去年我和家里人正在纠结装修方案，整个武汉的家装市场被我们跑了个遍，最终还是在莫愁商城里找到了中意的建材，实际 效果也非常的满意，外观时尚大方功能齐全人性化。</span>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr class="exhibition_box">
                    <td>
                        <div class="exhibition_box_top">
                            <a href="{:url('Home/sjshaijia4')}">
                                <img src="__STATIC__/assets/images/shaijia_04.png" alt="">
                            </a>

                        </div>
                        <div class="exhibition_box_bottom">
                            <div style="padding:0;">
                                <img src="__STATIC__/assets/images/shaijiatu_logo1.jpg" alt="">
                            </div>
                            <div style="display: flex;flex-direction: column;">
                                <a href="{:url('Home/sjshaijia4')}">
                                    <b>充满童趣和想象的儿童房</b>
                                </a>
                                <span>这是我们家孩子的房间，当初从老家搬过来时就答应他一定要给他属于自己的空间。</span>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr class="exhibition_box">
                    <td>
                        <div class="exhibition_box_top">
                            <a href="{:url('Home/sjshaijia5')}">
                                <img src="__STATIC__/assets/images/shaijia_05.png" alt="">
                            </a>

                        </div>
                        <div class="exhibition_box_bottom">
                            <div style="padding:0;">
                                <img src="__STATIC__/assets/images/shaijiatu_logo1.jpg" alt="">
                            </div>
                            <div style="display: flex;flex-direction: column;">
                                <a href="{:url('Home/sjshaijia5')}">
                                    <b>阳光飘窗榻榻米</b>
                                </a>
                                <span>本人平时喜欢日本动漫，对榻榻米有很深的情怀，所以这一次我也算是说服了全家人定制了这款榻榻米，而且买回来后家里人都非常喜欢。</span>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr class="exhibition_box">
                    <td>
                        <div class="exhibition_box_top">
                            <a href="{:url('Home/sjshaijia6')}">
                                <img src="__STATIC__/assets/images/shaijia_06.png" alt="">
                            </a>

                        </div>
                        <div class="exhibition_box_bottom">
                            <div style="padding:0;">
                                <img src="__STATIC__/assets/images/shaijiatu_logo2.jpg" alt="">
                            </div>
                            <div style="display: flex;flex-direction: column;">
                                <a href="{:url('Home/sjshaijia6')}">
                                    <b>亚克力与木纹腰线衣柜</b>
                                </a>
                                <span>这款定制衣柜当初就是看中了他流光色彩的面板，使用起来手感特别棒，当然了费用也比同类商品要贵一点，不过我申请了莫愁商城的分期服务，减少了压力。</span>
                            </div>
                        </div>
                    </td>
                </tr> -->


            </tbody>
        </table>
        <div id="wrap" class="page_btn clear"></div>
    </div>
    <div id="info_modal" class="tips_info"></div>
    <div id="scxc" class="scxc" style="display: none;">
        <div class="img-box">
            <p class="up-p">发布您的评论</p>
            <textarea placeholder="请输入不要超过50个字符" required name="" maxlength="50" style="padding: 20px; width: 100%;height: 150px;border: 0;background: #EFEFEF; font-size: 18px;"></textarea>
        </div>
        <div class="img-box full">
            <section class=" img-section">
                <p class="up-p">晒家图片：
                    <span class="up-span">最多可以上传5张图片。</span>
                </p>
                <div class="z_photo upimg-div clear">
                    <!-- <section class="up-section fl">
                                <span class="up-span"></span>
                                <img src="/img/buyerCenter/a7.png" class="close-upimg">
                                <img src="/img/buyerCenter/3c.png" class="type-upimg" alt="添加标签">
                                <img src="/img/test2.jpg" class="up-img">
                                <p class="img-namep"></p>
                                <input id="taglocation" name="taglocation" value="" type="hidden">
                                <input id="tags" name="tags" value="" type="hidden">
                            </section> -->
                    <section class="z_file fl">
                        <img src="__STATIC__/assets/images/tianjia.png" class="add-img">
                        <input type="file" name="file" id="file" class="file" value="" accept="image/jpg,image/jpeg,image/png,image/bmp" multiple
                        />
                    </section>
                </div>
            </section>
        </div>
        <div class="buttom_tj pull-right">
            <button class="layui-btn">取消</button>
            <button class="layui-btn">发布</button>
        </div>
        <aside class="mask works-mask">
            <div class="mask-content">
                <p class="del-p ">您确定要删除图片吗？</p>
                <p class="check-p">
                    <span class="del-com wsdel-ok">确定</span>
                    <span class="wsdel-no">取消</span>
                </p>
            </div>
        </aside>



    </div>

    <!-- 底部 -->
    {include file="public/footer"}

</body>
<script src="__STATIC__/assets/arr_css/jquery-3.3.1.js"></script>
<script type="text/javascript" src="__STATIC__/assets/arr_css/jquery.SuperSlide2.js"></script>
<script src="__STATIC__/assets/arr_css/bootstrap.min.js"></script>
<script src="__STATIC__/assets/arr_css/head.js"></script>
<script src="__STATIC__/assets/index_css/index.js"></script>
<script src="__STATIC__/assets/house/exhibition.js"></script>
<script src="__STATIC__/assets/house/imgUp.js"></script>
<script src="__STATIC__/assets/house/imgPlugin.js"></script>
<script src="__STATIC__/layer/layer.js"></script>

<script>
    function shaijia() {

        $.ajax({
            type: 'POST',
            url: "{:url('House/ifempty')}",
            success: function (data) {
                if (data == 'empty') {
                    layer.msg('您还没有登入,请先登入!', {
                        icon: 2
                    });
                } else {
                    layer.open({
                        type: 1,
                        area: ['1260px', '750px'],
                        title: false,
                        content: $('#scxc')
                    });
                }
            }
        });

    }

    // 验证文件的合法性
    function validateUp(files, defaults) {
        var arrFiles = []; // 替换的文件数组
        for (var i = 0, file; file = files[i]; i++) {
            // 获取文件上传的后缀名
            var newStr = file.name.split("").reverse().join("");
            if (newStr.split(".")[0] != null) {
                var type = newStr.split(".")[0].split("")
                    .reverse().join("");
                console.log(type + "===type===");
                if (jQuery.inArray(type, defaults.fileType) > -1) {
                    // 类型符合，可以上传
                    if (file.size >= defaults.fileSize) {
                        alert('文件大小"' + file.name + '"超出5M限制！');
                    } else {
                        arrFiles.push(file);
                    }
                } else {
                    alert('您上传的"' + file.name + '"不符合上传类型');
                }
            } else {
                alert('您上传的"' + file.name + '"无法识别类型');
            }
        }
        return arrFiles;
    };

    function uploadImg(opt, file, obj) {
        $("#imguploadFinish").val(false);
        // 验证通过图片异步上传
        var url = opt.url;
        var data = new FormData();
        data.append("path", opt.formData.path);
        data.append("file", file);
        $.ajax({
            type: 'POST',
            url: url,
            data: data,
            processData: false,
            contentType: false,
            dataType: 'json',
            success: function (data) {
                // console.log("chenggong");
                // obj.remove();
                // 上传成功
                if (data.error == 0) {
                    $(".up-section").removeClass("loading");
                    $(".up-img").removeClass(
                        "up-opcity");
                    $("#imguploadFinish").val(true);
                    var htmlStr = "<input type='text' style='display:none;' name='" +
                        opt.formData.name +
                        "' value='" +
                        data.url +
                        "'>";
                    obj.append(htmlStr);
                    if (successCallBack) {
                        successCallBack(data);
                    }
                }

                if (data.error == 1) {
                    obj.remove();
                    $("#imguploadFinish").val(false);
                    if (errorCallBack) {
                        errorCallBack(data.url);
                    }
                }
            },
            error: function (e) {
                obj.remove();
                var err = "上传失败，请联系管理员！";
                $("#imguploadFinish").val(false);
                if (errorCallBack) {
                    errorCallBack(err);
                }
            }
        });
    }
</script>

</html>